﻿using System;
using System.Collections.Generic;
using System.Text;
using CTEM.Controllers.Global;

namespace CTEM.Models
{
    public class VH_VehicleDTO
    {
        private const string CATEGORY_VEHICLE = "PHƯƠNG TIỆN";
        private const string CATEGORY_MACHINE = "MÁY CƠ";
        private const string CATEGORY_BARGE = "XÀ LAN";

        private const string STATUS_BUSY = "ĐANG SỬ DỤNG";
        private const string STATUS_FREE = "RẢNH RỖI";
        private const string STATUS_MAINTAIN = "BẢO TRÌ";

        public long VehicleID { get; set; }
        public string Name { get; set; }
        public string Number { get; set; }
        public long WarehouseID { get; set; }
        public long ConstructionID { get; set; }
        public long ManagerID { get; set; }
        public string Status { get; set; }
        public string Category { get; set; }
        public DateTime DateBought { get; set; }
        public bool IsActive { get; set; }
        public bool IsDelete { get; set; }
        public string CreatedBy { get; set; }
        public DateTime CreatedDate { get; set; }
        public string UpdatedBy { get; set; }
        public DateTime LastUpdated { get; set; }

        public HistoryLevel History { get; set; }
        
        public VH_VehicleDTO()
        {
            VehicleID = 0;
            Name = Constants.EMPTY_TEXT;
            Number = Constants.EMPTY_TEXT;
            WarehouseID = 0;
            ConstructionID = 0;
            ManagerID = 0;
            Status = Constants.EMPTY_TEXT;
            Category = Constants.EMPTY_TEXT; ;
            DateBought = DateTime.Today;
            IsActive = true;
            IsDelete = false;
            CreatedBy = Global.CurrentUser.Username;
            CreatedDate = DateTime.Today;
            UpdatedBy = Global.CurrentUser.Username;
            LastUpdated = DateTime.Today;
        }
        public static List<String> getCategory()
        {
            List<string> list = new List<string>();
            list.Add(CATEGORY_VEHICLE);
            list.Add(CATEGORY_MACHINE);
            list.Add(CATEGORY_BARGE);
            return list;
        }

        public static List<string> getStatus()
        {
            List<string> list = new List<string>();
            list.Add(STATUS_FREE);
            list.Add(STATUS_BUSY);
            list.Add(STATUS_MAINTAIN);
            return list;
        }
    }
}
